Skip to content

Fixed iOS photo GPS information #4393

Open
gabriel-bolbotina wants to merge 5 commits intomasterfrom
fix/ios-photo-geolocation
Open

Fixed iOS photo GPS information #4393
gabriel-bolbotina wants to merge 5 commits intomasterfrom
fix/ios-photo-geolocation

Conversation

@gabriel-bolbotina
Copy link
Copy Markdown
Contributor

@gabriel-bolbotina gabriel-bolbotina commented Mar 17, 2026

Modified the image picker logic for gallery and camera inputs.

  • the camera logic use UIImagePickerController
  • the gallery picker now uses PHPickerViewController instead of UIImagePickerController API. This controller preserves all the EXIF metadata from photos, thus the GPS information is kept.

Added IOSGalleryPickerDelegate, a PHPickerViewControllerDelegate implementation that retrieves the original image metadata via NSItemProvider, which preserves GPS data and calls back into the Qt layer on the main thread

Tested on iOS 26 using the clone of this project

Edit after QA: added date exif data for the photo taken with camera

@Withalion Withalion linked an issue Mar 23, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 65651 dmg Expires: 22/06/2026 #6565
linux Build 📬 Mergin Maps 65761 x86_64 Expires: 22/06/2026 #6576
win64 Build 📬 Mergin Maps 57601 win64 Expires: 22/06/2026 #5760
Android Build 📬 Mergin Maps 787651 APK [arm64-v8a] Expires: 22/06/2026 #7876
Android Build 📬 Mergin Maps 787611 APK [armeabi-v7a] Expires: 22/06/2026 #7876
iOS Build 📬 Build number: 26.03.881611 #8816

Copy link
Copy Markdown
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@Withalion Withalion requested a review from tomasMizera March 26, 2026 22:43
@IvaKuklica
Copy link
Copy Markdown

Testing Note — EXIF Metadata Pre-fill from Camera and Gallery (iOS)

Gallery photos ✅ — EXIF metadata is correctly read from the photo and the relevant fields in the feature form are pre-filled as expected.
Camera photos ✅ —EXIF metadata is correctly read from the photo and the relevant fields in the feature form are pre-filled as expected.

Summary:
⚠️EXIF pre-filling is fully functional for gallery photos. For camera photos, all EXIF fields are correctly pre-filled except the date field, which remains empty after capture.
Screenshot 2026-04-08 125958

Added PHAsset handling to retrieve gps data
Got rid of deprecated API and used PHPickerViewController
@gabriel-bolbotina gabriel-bolbotina force-pushed the fix/ios-photo-geolocation branch from de3bc0c to efcb0f5 Compare April 8, 2026 12:37
@gabriel-bolbotina gabriel-bolbotina force-pushed the fix/ios-photo-geolocation branch from efcb0f5 to 82dc70a Compare April 8, 2026 12:38
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Coverage Report for CI Build 24135726733

Warning

No base build found for commit 7ef94ab on master.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 59.768%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 14685
Covered Lines: 8777
Line Coverage: 59.77%
Coverage Strength: 104.2 hits per line

💛 - Coveralls

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build Build failed or not found. #6651
linux Build 📬 Mergin Maps 66622 x86_64 Expires: 07/07/2026 #6662
win64 Build 📬 Mergin Maps 58461 win64 Expires: 07/07/2026 #5846
Android Build 📬 Mergin Maps 796311 APK [armeabi-v7a] Expires: 07/07/2026 #7963
📬 Mergin Maps 796311 APK [armeabi-v7a] Google Play Store #7963
Android Build 📬 Mergin Maps 796351 APK [arm64-v8a] Expires: 07/07/2026 #7963
📬 Mergin Maps 796351 APK [arm64-v8a] Google Play Store #7963
iOS Build 📬 Build number: 26.04.890211 #8902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile is not pre-filling gps info from gallery picture

3 participants